home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Sample Code / MPW IIGS SC / SC.017.Darts / darts.c / darts.r < prev    next >
Encoding:
Text File  |  1990-06-24  |  34.5 KB  |  1,696 lines  |  [TEXT/MPS ]

  1. /*****************************************************************/
  2. /*
  3. /* Darts.r
  4. /*
  5. /* Copyright (c)
  6. /* Apple computer, Inc. 1988-1990
  7. /* All Rights Reserved
  8. /*
  9. /* Developer Technical Support Apple II Sample Code
  10. /*
  11. /* This file contains all definitions of resources used by
  12. /* the darts program.
  13. /*
  14. /*****************************************************************/
  15.  
  16.  
  17.  
  18.  
  19. /*---------------------------------------------------------------*/
  20.  
  21. #include "typesiigs.r"
  22.  
  23. /*------------------- Definitions -------------------*/
  24.  
  25.  
  26. /* Window ID numbers */
  27. #define RobinWindow $1000
  28. #define CrickettWindow $1001
  29.  
  30. #define Player1ID 0
  31. #define Player2ID $8000
  32.  
  33. /* Window position and size definitions. */
  34. #define WinTop 30
  35. #define WinLeft 10
  36. #define WinHeight 165
  37. #define WinWidth 620
  38.  
  39. /* Important positions inside the window */
  40. #define Center WinWidth/2
  41. #define Margin 4
  42.  
  43. /* Vertical position of the Line Edit fields */
  44. #define TopofLE 2
  45. #define BotOfLE 15
  46.  
  47. /* Score Size */
  48. #define TopOfScore 20
  49. #define BotOfScore 62
  50. #define ScoreWidth 100
  51.  
  52. /* Vertical Positions of rows of buttons in Robin window */
  53. #define TopRow1 70
  54. #define BotRow1 83
  55. #define TopRow2 90
  56. #define BotRow2 103
  57. #define TopRow3 110
  58. #define BotRow3 123
  59. #define TopRow4 140
  60. #define BotRow4 153
  61.  
  62. /* Spacing of buttons in robin window */
  63. #define DeltaX 30
  64. #define ButWidth 24
  65.  
  66. #define Col1 LeftEdge1
  67. #define Col2 LeftEdge1+1*DeltaX
  68. #define Col3 LeftEdge1+2*DeltaX
  69. #define Col4 LeftEdge1+3*DeltaX
  70. #define Col5 LeftEdge1+4*DeltaX
  71. #define Col6 LeftEdge1+5*DeltaX
  72. #define Col7 LeftEdge1+6*DeltaX
  73. #define Col8 LeftEdge1+7*DeltaX
  74. #define Col9 LeftEdge1+8*DeltaX
  75. #define Col10 LeftEdge1+9*DeltaX
  76.  
  77. /* Starting positions of items in Robin Window */
  78. #define LeftEdge1 4
  79. #define LeftEdge2 Center+LeftEdge1
  80.  
  81. #define ListWidth 150
  82.  
  83.  
  84. /* Spacing of buttons in Crickett Window */
  85. #define KButWidth 50
  86. #define KButGap 50
  87. #define VDelta (BotRow4-TopOfScore)/8
  88. #define VGap 5
  89.  
  90. /* Vertical posisions of buttons in Cricktt Window */
  91. #define TopRow20 TopOfScore
  92. #define TopRow19 TopRow20+VDelta
  93. #define TopRow18 TopRow19+VDelta
  94. #define TopRow17 TopRow18+VDelta
  95. #define TopRow16 TopRow17+VDelta
  96. #define TopRow15 TopRow16+VDelta
  97. #define TopRowBull TopRow15+VDelta
  98.  
  99.  
  100. #define P2Name $100001
  101. #define P1Name $100002
  102.  
  103. #define P1But01 1
  104. #define P1But02 2
  105. #define P1But03 3
  106. #define P1But04 4
  107. #define P1But05 5
  108. #define P1But06 6
  109. #define P1But07 7
  110. #define P1But08 8
  111. #define P1But09 9
  112. #define P1But10 10
  113. #define P1But11 11
  114. #define P1But12 12
  115. #define P1But13 13
  116. #define P1But14 14
  117. #define P1But15 15
  118. #define P1But16 16
  119. #define P1But17 17
  120. #define P1But18 18
  121. #define P1But19 19
  122. #define P1But20 20
  123. #define P1But25 25
  124. #define P1ButBull 50
  125.  
  126. #define P2But01 1+$100
  127. #define P2But02 2+$100
  128. #define P2But03 3+$100
  129. #define P2But04 4+$100
  130. #define P2But05 5+$100
  131. #define P2But06 6+$100
  132. #define P2But07 7+$100
  133. #define P2But08 8+$100
  134. #define P2But09 9+$100
  135. #define P2But10 10+$100
  136. #define P2But11 11+$100
  137. #define P2But12 12+$100
  138. #define P2But13 13+$100
  139. #define P2But14 14+$100
  140. #define P2But15 15+$100
  141. #define P2But16 16+$100
  142. #define P2But17 17+$100
  143. #define P2But18 18+$100
  144. #define P2But19 19+$100
  145. #define P2But20 20+$100
  146. #define P2But25 25+$100
  147. #define P2ButBull 50+$100
  148.  
  149. #define Player1List $30000
  150. #define Player2List $40000
  151.  
  152. #define NewBut $20000
  153. #define QuitBut $10000
  154.  
  155. #define P1Score $50000
  156. #define P2Score $60000
  157. #define P1ScoreText $50000
  158. #define P2ScoreText $60000
  159.  
  160. #Define KValue $70000
  161. #Define K1ScoreText $80000
  162. #Define K2ScoreText $90000
  163.  
  164. #Define KPlayer1List $30001
  165. #Define KPlayer2List $40001
  166. #Define K1Score $50001
  167. #Define K2Score $60001
  168.  
  169. #define K1But15 15+$200
  170. #define K1But16 16+$200
  171. #define K1But17 17+$200
  172. #define K1But18 18+$200
  173. #define K1But19 19+$200
  174. #define K1But20 20+$200
  175. #define K1ButBull 50+$200
  176.  
  177. #define K2But15 15+$300
  178. #define K2But16 16+$300
  179. #define K2But17 17+$300
  180. #define K2But18 18+$300
  181. #define K2But19 19+$300
  182. #define K2But20 20+$300
  183. #define K2ButBull 50+$300
  184.  
  185.  
  186.  
  187. #define Str1 1+$100
  188. #define Str2 2+$100
  189. #define Str3 3+$100
  190. #define Str4 4+$100
  191. #define Str5 5+$100
  192. #define Str6 6+$100
  193. #define Str7 7+$100
  194. #define Str8 8+$100
  195. #define Str9 9+$100
  196. #define Str10 10+$100
  197. #define Str11 11+$100
  198. #define Str12 12+$100
  199. #define Str13 13+$100
  200. #define Str14 14+$100
  201. #define Str15 15+$100
  202. #define Str16 16+$100
  203. #define Str17 17+$100
  204. #define Str18 18+$100
  205. #define Str19 19+$100
  206. #define Str20 20+$100
  207. #define Str25 25+$100
  208. #define StrBull 50+$100
  209. #define QuitStr 91+$100
  210. #define NewStr 92+$100
  211.  
  212.  
  213.  
  214.  
  215. /*----------------------- About Box ------------------------------*/
  216. resource rAlertString (1) {
  217.  "0\$19\$00\$A0\$00\$AA\$00\$E0\$01"
  218.  "0/"
  219.  TBCenterJust
  220.  TBStyleOutline
  221.  "Darts"
  222.  TBEndOfLine
  223.  TBStylePlain
  224.  "A simple program to help us keep score. Originally written for Robin."
  225.  TBEndOfLine
  226.  TBEndOfLine
  227.  "by"
  228.  TBEndOfLine
  229.  "Steven E. Glass"
  230.  TBEndOfLine
  231.  TBEndOfLine
  232.  "Copyright 1988-1990"
  233.  TBEndOfLine
  234.  "Steven E. Glass and Apple Computer, Inc."
  235.  TBEndOfLine
  236.  "All Rights Reserved"
  237.  TBEndOfLine
  238.  "Version 3.0/^#6\$00"
  239. };
  240.  
  241.  
  242.  
  243.  
  244. /*----------------------- Confirm Box ------------------------------*/
  245. resource rAlertString (2) {
  246.  "42/Do you really want to quit?/^#3/#2"
  247.  "\$00"
  248. };
  249.  
  250.  
  251. /*----------------------- Confirm Box ------------------------------*/
  252. resource rAlertString (3) {
  253.  "43/We have a winner!!!/^#6"
  254.  "\$00"
  255. };
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. /*----------------------Startup Record ---------------------------*/
  263. resource rToolStartup (1) {
  264.  mode640, /* master SCB */
  265.  {
  266.         3,$0300,  /* misc tools */
  267.         4,$0301,  /* quickdraw */
  268.         5,$0302,  /* desk manager */
  269.         6,$0300,  /* eventMgr */
  270. /*      7,$0200,  /* scheduler */
  271. /*      8,$0301,  /* sound tools */
  272. /*      9,$0201,  /* ADB tools */
  273. /*      10,$0202, /* SANE */
  274.         11,$0200, /* int math */
  275.         14,$0301, /* Window Manager */
  276.         15,$0301, /* Menu Manager */
  277.         16,$0301, /* Control Manager */
  278.         18,$0301, /* QD Aux */
  279. /*      19,$0300, /* print manager */
  280.         20,$0301, /* LineEdit tool set */
  281.         21,$0302, /* Dialog Manager */
  282.         22,$0300, /* Scrap manager */
  283. /*      23,$0301, /* standard file */
  284. /*      25,$0104, /* NoteSynth */
  285. /*      26,$0104, /* Note Seq */
  286.         27,$0301, /* Font manager */
  287.         28,$0301, /* list manager */
  288. /*      29,$0101, /* ACE */
  289. /*      32,$0103, /* Midi Tools */
  290. /*      34,$0101  /* text edit */
  291.  }
  292. };
  293.  
  294.  
  295.  
  296.  
  297. /*---------------------------------------------------------------------------*/
  298. /*
  299. /* RobinWindow
  300. /*
  301. /* This is the template for the window that is used to score Robin's dart game.
  302. /*
  303. /*---------------------------------------------------------------------------*/
  304. resource rWindParam1 (RobinWindow) {
  305.  fTitle+fVis, /* Frame Bits */
  306.  RobinWindow, /* title ID */
  307.  0, /* ref Con */
  308.  {0,0,0,0}, /* Zoom Rect */
  309.  0, /* color table id */
  310.  {0,0}, /* origin */
  311.  {0,0}, /* data size */
  312.  {0,0}, /* max height-width */
  313.  {0,0}, /* scroll amount, hor,ver */
  314.  {0,0}, /* page amount */
  315.  0, /* wInfo Ref Con */
  316.  0, /* wInfo height */
  317.  {WinTop,WinLeft,WinTop+WinHeight,WinLeft+WinWidth}, /* window Position */
  318.  infront, /* wPlane */
  319.  RobinWindow, /* Control Ref */
  320.  refIsResource*0x0100+ResourceToResource /* Verb */
  321. };
  322.  
  323. /*---------------------------------------------------------------------------*/
  324. /* This is the title of the Robin Window
  325. /*---------------------------------------------------------------------------*/
  326. resource rPString (RobinWindow) {
  327.  "Robin Darts"
  328.  };
  329.  
  330.  
  331.  
  332. /* List of all controls in Robin Window */
  333.  
  334. resource rControlList (RobinWindow) {
  335.  {
  336.  P2Name,
  337.  P1Name,
  338.  
  339.  P1But01,
  340.  P1But02,
  341.  P1But03,
  342.  P1But04,
  343.  P1But05,
  344.  P1But06,
  345.  P1But07,
  346.  P1But08,
  347.  P1But09,
  348.  P1But10,
  349.  P1But11,
  350.  P1But12,
  351.  P1But13,
  352.  P1But14,
  353.  P1But15,
  354.  P1But16,
  355.  P1But17,
  356.  P1But18,
  357.  P1But19,
  358.  P1But20,
  359.  P1But25,
  360.  P1ButBull,
  361.  
  362.  P2But01,
  363.  P2But02,
  364.  P2But03,
  365.  P2But04,
  366.  P2But05,
  367.  P2But06,
  368.  P2But07,
  369.  P2But08,
  370.  P2But09,
  371.  P2But10,
  372.  P2But11,
  373.  P2But12,
  374.  P2But13,
  375.  P2But14,
  376.  P2But15,
  377.  P2But16,
  378.  P2But17,
  379.  P2But18,
  380.  P2But19,
  381.  P2But20,
  382.  P2But25,
  383.  P2ButBull,
  384.  
  385.  Player1List,
  386.  Player2List,
  387.  
  388.  NewBut,
  389.  QuitBut,
  390.  
  391.  P1Score,
  392.  P2Score
  393.  };
  394. };
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. resource rControlTemplate (P1Name) {
  404.  0, /* control ID */
  405.  {TopOfLE,LeftEdge1,BotOfLE,Center-Margin}, /* control rectangle */
  406.  EditLineControl{{ /* control type */
  407.  0, /* Flag */
  408.  fCtlProcNotPtr+RefIsResource, /* More Flags */
  409.  0, /* ref con */
  410.  40, /* Max Length */
  411.  P1Name, /* Initial Value Ref */
  412.  0 /* Text Length (ignored) */
  413.  }};
  414. };
  415.  
  416. resource rPString (P1Name) {
  417.  "Player One"
  418.  };
  419.  
  420.  
  421. resource rControlTemplate (P2Name) {
  422.  0, /* control ID */
  423.  {TopOfLE,LeftEdge2,BotOfLE,WinWidth-Margin}, /* control rectangle */
  424.  EditLineControl{{ /* control type */
  425.  0, /* Flag */
  426.  fCtlProcNotPtr+RefIsResource, /* More Flags */
  427.  0, /* ref con */
  428.  40, /* Max Length */
  429.  P2Name, /* Initial Value Ref */
  430.  0 /* Text Length (ignored) */
  431.  }};
  432. };
  433.  
  434.  
  435. resource rPString (P2Name) {
  436.  "Player Two"
  437.  };
  438.  
  439.  
  440. resource rControlTemplate (P1But01) {
  441.  1+Player1ID, /* control ID */
  442.  {TopRow1,Col1,BotRow1,Col1+ButWidth}, /* control rect */
  443.  simpleButtonControl{{ /* control type */
  444.  3, /* flag */
  445.  fCtlProcNotPtr+RefIsResource, /* more flags */
  446.  0, /* ref con */
  447.  Str1
  448.  }};
  449. };
  450.  
  451. resource rControlTemplate (P1But02) {
  452.  2+Player1ID, /* control ID */
  453.  {TopRow1,Col2,BotRow1,Col2+ButWidth}, /* control rect */
  454.  simpleButtonControl{{ /* control type */
  455.  3, /* flag */
  456.  fCtlProcNotPtr+RefIsResource, /* more flags */
  457.  0, /* ref con */
  458.  Str2
  459.  }};
  460. };
  461.  
  462. resource rControlTemplate (P1But03) {
  463.  3+Player1ID, /* control ID */
  464.  {TopRow1,Col3,BotRow1,Col3+ButWidth}, /* control rect */
  465.  simpleButtonControl{{ /* control type */
  466.  3, /* flag */
  467.  fCtlProcNotPtr+RefIsResource, /* more flags */
  468.  0, /* ref con */
  469.  Str3
  470.  }};
  471. };
  472.  
  473. resource rControlTemplate (P1But04) {
  474.  4+Player1ID, /* control ID */
  475.  {TopRow1,Col4,BotRow1,Col4+ButWidth}, /* control rect */
  476.  simpleButtonControl{{ /* control type */
  477.  3, /* flag */
  478.  fCtlProcNotPtr+RefIsResource, /* more flags */
  479.  0, /* ref con */
  480.  Str4
  481.  }};
  482. };
  483.  
  484. resource rControlTemplate (P1But05) {
  485.  5+Player1ID, /* control ID */
  486.  {TopRow1,Col5,BotRow1,Col5+ButWidth}, /* control rect */
  487.  simpleButtonControl{{ /* control type */
  488.  3, /* flag */
  489.  fCtlProcNotPtr+RefIsResource, /* more flags */
  490.  0, /* ref con */
  491.  Str5
  492.  }};
  493. };
  494.  
  495. resource rControlTemplate (P1But06) {
  496.  6+Player1ID, /* control ID */
  497.  {TopRow1,Col6,BotRow1,Col6+ButWidth}, /* control rect */
  498.  simpleButtonControl{{ /* control type */
  499.  3, /* flag */
  500.  fCtlProcNotPtr+RefIsResource, /* more flags */
  501.  0, /* ref con */
  502.  Str6
  503.  }};
  504. };
  505.  
  506. resource rControlTemplate (P1But07) {
  507.  7+Player1ID, /* control ID */
  508.  {TopRow1,Col7,BotRow1,Col7+ButWidth}, /* control rect */
  509.  simpleButtonControl{{ /* control type */
  510.  3, /* flag */
  511.  fCtlProcNotPtr+RefIsResource, /* more flags */
  512.  0, /* ref con */
  513.  Str7
  514.  }};
  515. };
  516.  
  517. resource rControlTemplate (P1But08) {
  518.  8+Player1ID, /* control ID */
  519.  {TopRow1,Col8,BotRow1,Col8+ButWidth}, /* control rect */
  520.  simpleButtonControl{{ /* control type */
  521.  3, /* flag */
  522.  fCtlProcNotPtr+RefIsResource, /* more flags */
  523.  0, /* ref con */
  524.  Str8
  525.  }};
  526. };
  527.  
  528. resource rControlTemplate (P1But09) {
  529.  9+Player1ID, /* control ID */
  530.  {TopRow1,Col9,BotRow1,Col9+ButWidth}, /* control rect */
  531.  simpleButtonControl{{ /* control type */
  532.  3, /* flag */
  533.  fCtlProcNotPtr+RefIsResource, /* more flags */
  534.  0, /* ref con */
  535.  Str9
  536.  }};
  537. };
  538.  
  539. resource rControlTemplate (P1But10) {
  540.  10+Player1ID, /* control ID */
  541.  {TopRow1,Col10,BotRow1,Col10+ButWidth}, /* control rect */
  542.  simpleButtonControl{{ /* control type */
  543.  3, /* flag */
  544.  fCtlProcNotPtr+RefIsResource, /* more flags */
  545.  0, /* ref con */
  546.  Str10
  547.  }};
  548. };
  549.  
  550. resource rControlTemplate (P1But11) {
  551.  11+Player1ID, /* control ID */
  552.  {TopRow2,Col1,BotRow2,Col1+ButWidth}, /* control rect */
  553.  simpleButtonControl{{ /* control type */
  554.  3, /* flag */
  555.  fCtlProcNotPtr+RefIsResource, /* more flags */
  556.  0, /* ref con */
  557.  Str11
  558.  }};
  559. };
  560.  
  561. resource rControlTemplate (P1But12) {
  562.  12+Player1ID, /* control ID */
  563.  {TopRow2,Col2,BotRow2,Col2+ButWidth}, /* control rect */
  564.  simpleButtonControl{{ /* control type */
  565.  3, /* flag */
  566.  fCtlProcNotPtr+RefIsResource, /* more flags */
  567.  0, /* ref con */
  568.  Str12
  569.  }};
  570. };
  571.  
  572. resource rControlTemplate (P1But13) {
  573.  13+Player1ID, /* control ID */
  574.  {TopRow2,Col3,BotRow2,Col3+ButWidth}, /* control rect */
  575.  simpleButtonControl{{ /* control type */
  576.  3, /* flag */
  577.  fCtlProcNotPtr+RefIsResource, /* more flags */
  578.  0, /* ref con */
  579.  Str13
  580.  }};
  581. };
  582.  
  583. resource rControlTemplate (P1But14) {
  584.  14+Player1ID, /* control ID */
  585.  {TopRow2,Col4,BotRow2,Col4+ButWidth}, /* control rect */
  586.  simpleButtonControl{{ /* control type */
  587.  3, /* flag */
  588.  fCtlProcNotPtr+RefIsResource, /* more flags */
  589.  0, /* ref con */
  590.  Str14
  591.  }};
  592. };
  593.  
  594. resource rControlTemplate (P1But15) {
  595.  15+Player1ID, /* control ID */
  596.  {TopRow2,Col5,BotRow2,Col5+ButWidth}, /* control rect */
  597.  simpleButtonControl{{ /* control type */
  598.  3, /* flag */
  599.  fCtlProcNotPtr+RefIsResource, /* more flags */
  600.  0, /* ref con */
  601.  Str15
  602.  }};
  603. };
  604.  
  605. resource rControlTemplate (P1But16) {
  606.  16+Player1ID, /* control ID */
  607.  {TopRow2,Col6,BotRow2,Col6+ButWidth}, /* control rect */
  608.  simpleButtonControl{{ /* control type */
  609.  3, /* flag */
  610.  fCtlProcNotPtr+RefIsResource, /* more flags */
  611.  0, /* ref con */
  612.  Str16
  613.  }};
  614. };
  615.  
  616. resource rControlTemplate (P1But17) {
  617.  17+Player1ID, /* control ID */
  618.  {TopRow2,Col7,BotRow2,Col7+ButWidth}, /* control rect */
  619.  simpleButtonControl{{ /* control type */
  620.  3, /* flag */
  621.  fCtlProcNotPtr+RefIsResource, /* more flags */
  622.  0, /* ref con */
  623.  Str17
  624.  }};
  625. };
  626.  
  627. resource rControlTemplate (P1But18) {
  628.  18+Player1ID, /* control ID */
  629.  {TopRow2,Col8,BotRow2,Col8+ButWidth}, /* control rect */
  630.  simpleButtonControl{{ /* control type */
  631.  3, /* flag */
  632.  fCtlProcNotPtr+RefIsResource, /* more flags */
  633.  0, /* ref con */
  634.  Str18
  635.  }};
  636. };
  637.  
  638. resource rControlTemplate (P1But19) {
  639.  19+Player1ID, /* control ID */
  640.  {TopRow2,Col9,BotRow2,Col9+ButWidth}, /* control rect */
  641.  simpleButtonControl{{ /* control type */
  642.  3, /* flag */
  643.  fCtlProcNotPtr+RefIsResource, /* more flags */
  644.  0, /* ref con */
  645.  Str19
  646.  }};
  647. };
  648.  
  649. resource rControlTemplate (P1But20) {
  650.  20+Player1ID, /* control ID */
  651.  {TopRow2,Col10,BotRow2,Col10+ButWidth}, /* control rect */
  652.  simpleButtonControl{{ /* control type */
  653.  3, /* flag */
  654.  fCtlProcNotPtr+RefIsResource, /* more flags */
  655.  0, /* ref con */
  656.  Str20
  657.  }};
  658. };
  659.  
  660. resource rControlTemplate (P1But25) {
  661.  25+Player1ID, /* control ID */
  662.  {TopRow3,Col1,BotRow3,Col5+ButWidth}, /* control rect */
  663.  simpleButtonControl{{ /* control type */
  664.  3, /* flag */
  665.  fCtlProcNotPtr+RefIsResource, /* more flags */
  666.  0, /* ref con */
  667.  Str25
  668.  }};
  669. };
  670.  
  671. resource rControlTemplate (P1ButBull) {
  672.  50+Player1ID, /* control ID */
  673.  {TopRow3,Col6,BotRow3,Col10+ButWidth}, /* control rect */
  674.  simpleButtonControl{{ /* control type */
  675.  3, /* flag */
  676.  fCtlProcNotPtr+RefIsResource, /* more flags */
  677.  0, /* ref con */
  678.  StrBull
  679.  }};
  680. };
  681.  
  682.  
  683.  
  684.  
  685.  
  686. resource rControlTemplate (P2But01) {
  687.  1+Player2ID, /* control ID */
  688.  {TopRow1,Center+Col1,BotRow1,Center+Col1+ButWidth}, /* control rect */
  689.  simpleButtonControl{{ /* control type */
  690.  3, /* flag */
  691.  fCtlProcNotPtr+RefIsResource, /* more flags */
  692.  0, /* ref con */
  693.  Str1
  694.  }};
  695. };
  696.  
  697. resource rControlTemplate (P2But02) {
  698.  2+Player2ID, /* control ID */
  699.  {TopRow1,Center+Col2,BotRow1,Center+Col2+ButWidth}, /* control rect */
  700.  simpleButtonControl{{ /* control type */
  701.  3, /* flag */
  702.  fCtlProcNotPtr+RefIsResource, /* more flags */
  703.  0, /* ref con */
  704.  Str2
  705.  }};
  706. };
  707.  
  708. resource rControlTemplate (P2But03) {
  709.  3+Player2ID, /* control ID */
  710.  {TopRow1,Center+Col3,BotRow1,Center+Col3+ButWidth}, /* control rect */
  711.  simpleButtonControl{{ /* control type */
  712.  3, /* flag */
  713.  fCtlProcNotPtr+RefIsResource, /* more flags */
  714.  0, /* ref con */
  715.  Str3
  716.  }};
  717. };
  718.  
  719. resource rControlTemplate (P2But04) {
  720.  4+Player2ID, /* control ID */
  721.  {TopRow1,Center+Col4,BotRow1,Center+Col4+ButWidth}, /* control rect */
  722.  simpleButtonControl{{ /* control type */
  723.  3, /* flag */
  724.  fCtlProcNotPtr+RefIsResource, /* more flags */
  725.  0, /* ref con */
  726.  Str4
  727.  }};
  728. };
  729.  
  730. resource rControlTemplate (P2But05) {
  731.  5+Player2ID, /* control ID */
  732.  {TopRow1,Center+Col5,BotRow1,Center+Col5+ButWidth}, /* control rect */
  733.  simpleButtonControl{{ /* control type */
  734.  3, /* flag */
  735.  fCtlProcNotPtr+RefIsResource, /* more flags */
  736.  0, /* ref con */
  737.  Str5
  738.  }};
  739. };
  740.  
  741. resource rControlTemplate (P2But06) {
  742.  6+Player2ID, /* control ID */
  743.  {TopRow1,Center+Col6,BotRow1,Center+Col6+ButWidth}, /* control rect */
  744.  simpleButtonControl{{ /* control type */
  745.  3, /* flag */
  746.  fCtlProcNotPtr+RefIsResource, /* more flags */
  747.  0, /* ref con */
  748.  Str6
  749.  }};
  750. };
  751.  
  752. resource rControlTemplate (P2But07) {
  753.  7+Player2ID, /* control ID */
  754.  {TopRow1,Center+Col7,BotRow1,Center+Col7+ButWidth}, /* control rect */
  755.  simpleButtonControl{{ /* control type */
  756.  3, /* flag */
  757.  fCtlProcNotPtr+RefIsResource, /* more flags */
  758.  0, /* ref con */
  759.  Str7
  760.  }};
  761. };
  762.  
  763. resource rControlTemplate (P2But08) {
  764.  8+Player2ID, /* control ID */
  765.  {TopRow1,Center+Col8,BotRow1,Center+Col8+ButWidth}, /* control rect */
  766.  simpleButtonControl{{ /* control type */
  767.  3, /* flag */
  768.  fCtlProcNotPtr+RefIsResource, /* more flags */
  769.  0, /* ref con */
  770.  Str8
  771.  }};
  772. };
  773.  
  774. resource rControlTemplate (P2But09) {
  775.  9+Player2ID, /* control ID */
  776.  {TopRow1,Center+Col9,BotRow1,Center+Col9+ButWidth}, /* control rect */
  777.  simpleButtonControl{{ /* control type */
  778.  3, /* flag */
  779.  fCtlProcNotPtr+RefIsResource, /* more flags */
  780.  0, /* ref con */
  781.  Str9
  782.  }};
  783. };
  784.  
  785. resource rControlTemplate (P2But10) {
  786.  10+Player2ID, /* control ID */
  787.  {TopRow1,Center+Col10,BotRow1,Center+Col10+ButWidth}, /* control rect */
  788.  simpleButtonControl{{ /* control type */
  789.  3, /* flag */
  790.  fCtlProcNotPtr+RefIsResource, /* more flags */
  791.  0, /* ref con */
  792.  Str10
  793.  }};
  794. };
  795.  
  796. resource rControlTemplate (P2But11) {
  797.  11+Player2ID, /* control ID */
  798.  {TopRow2,Center+Col1,BotRow2,Center+Col1+ButWidth}, /* control rect */
  799.  simpleButtonControl{{ /* control type */
  800.  3, /* flag */
  801.  fCtlProcNotPtr+RefIsResource, /* more flags */
  802.  0, /* ref con */
  803.  Str11
  804.  }};
  805. };
  806.  
  807. resource rControlTemplate (P2But12) {
  808.  12+Player2ID, /* control ID */
  809.  {TopRow2,Center+Col2,BotRow2,Center+Col2+ButWidth}, /* control rect */
  810.  simpleButtonControl{{ /* control type */
  811.  3, /* flag */
  812.  fCtlProcNotPtr+RefIsResource, /* more flags */
  813.  0, /* ref con */
  814.  Str12
  815.  }};
  816. };
  817.  
  818. resource rControlTemplate (P2But13) {
  819.  13+Player2ID, /* control ID */
  820.  {TopRow2,Center+Col3,BotRow2,Center+Col3+ButWidth}, /* control rect */
  821.  simpleButtonControl{{ /* control type */
  822.  3, /* flag */
  823.  fCtlProcNotPtr+RefIsResource, /* more flags */
  824.  0, /* ref con */
  825.  Str13
  826.  }};
  827. };
  828.  
  829. resource rControlTemplate (P2But14) {
  830.  14+Player2ID, /* control ID */
  831.  {TopRow2,Center+Col4,BotRow2,Center+Col4+ButWidth}, /* control rect */
  832.  simpleButtonControl{{ /* control type */
  833.  3, /* flag */
  834.  fCtlProcNotPtr+RefIsResource, /* more flags */
  835.  0, /* ref con */
  836.  Str14
  837.  }};
  838. };
  839.  
  840. resource rControlTemplate (P2But15) {
  841.  15+Player2ID, /* control ID */
  842.  {TopRow2,Center+Col5,BotRow2,Center+Col5+ButWidth}, /* control rect */
  843.  simpleButtonControl{{ /* control type */
  844.  3, /* flag */
  845.  fCtlProcNotPtr+RefIsResource, /* more flags */
  846.  0, /* ref con */
  847.  Str15
  848.  }};
  849. };
  850.  
  851. resource rControlTemplate (P2But16) {
  852.  16+Player2ID, /* control ID */
  853.  {TopRow2,Center+Col6,BotRow2,Center+Col6+ButWidth}, /* control rect */
  854.  simpleButtonControl{{ /* control type */
  855.  3, /* flag */
  856.  fCtlProcNotPtr+RefIsResource, /* more flags */
  857.  0, /* ref con */
  858.  Str16
  859.  }};
  860. };
  861.  
  862. resource rControlTemplate (P2But17) {
  863.  17+Player2ID, /* control ID */
  864.  {TopRow2,Center+Col7,BotRow2,Center+Col7+ButWidth}, /* control rect */
  865.  simpleButtonControl{{ /* control type */
  866.  3, /* flag */
  867.  fCtlProcNotPtr+RefIsResource, /* more flags */
  868.  0, /* ref con */
  869.  Str17
  870.  }};
  871. };
  872.  
  873. resource rControlTemplate (P2But18) {
  874.  18+Player2ID, /* control ID */
  875.  {TopRow2,Center+Col8,BotRow2,Center+Col8+ButWidth}, /* control rect */
  876.  simpleButtonControl{{ /* control type */
  877.  3, /* flag */
  878.  fCtlProcNotPtr+RefIsResource, /* more flags */
  879.  0, /* ref con */
  880.  Str18
  881.  }};
  882. };
  883.  
  884. resource rControlTemplate (P2But19) {
  885.  19+Player2ID, /* control ID */
  886.  {TopRow2,Center+Col9,BotRow2,Center+Col9+ButWidth}, /* control rect */
  887.  simpleButtonControl{{ /* control type */
  888.  3, /* flag */
  889.  fCtlProcNotPtr+RefIsResource, /* more flags */
  890.  0, /* ref con */
  891.  Str19
  892.  }};
  893. };
  894.  
  895. resource rControlTemplate (P2But20) {
  896.  20+Player2ID, /* control ID */
  897.  {TopRow2,Center+Col10,BotRow2,Center+Col10+ButWidth}, /* control rect */
  898.  simpleButtonControl{{ /* control type */
  899.  3, /* flag */
  900.  fCtlProcNotPtr+RefIsResource, /* more flags */
  901.  0, /* ref con */
  902.  Str20
  903.  }};
  904. };
  905.  
  906. resource rControlTemplate (P2But25) {
  907.  25+Player2ID, /* control ID */
  908.  {TopRow3,Center+Col1,BotRow3,Center+Col5+ButWidth}, /* control rect */
  909.  simpleButtonControl{{ /* control type */
  910.  3, /* flag */
  911.  fCtlProcNotPtr+RefIsResource, /* more flags */
  912.  0, /* ref con */
  913.  Str25
  914.  }};
  915. };
  916.  
  917. resource rControlTemplate (P2ButBull) {
  918.  50+Player2ID, /* control ID */
  919.  {TopRow3,Center+Col6,BotRow3,Center+Col10+ButWidth}, /* control rect */
  920.  simpleButtonControl{{ /* control type */
  921.  3, /* flag */
  922.  fCtlProcNotPtr+RefIsResource, /* more flags */
  923.  0, /* ref con */
  924.  StrBull
  925.  }};
  926. };
  927.  
  928.  
  929. resource rControlTemplate (Player1List) {
  930.  Player1List, /* Control ID */
  931.  {TopOfScore,Center-Margin-ListWidth,BotOfScore,Center-Margin}, /* list rectangle */
  932.  ListControl{{ /* list type */
  933.  0, /* flag */
  934.  fCtlProcNotPtr, /* more flags */
  935.  0, /* ref con */
  936.  0, /* Num Members in list */
  937.  0, /* list view (let list mgr calc) */
  938.  4, /* List type */
  939.  1, /* list start (start at top ) */
  940.  10, /* ListMemHeight */
  941.  6, /* ListMemSize */
  942.  0, /* ListRef (ID of list record) */
  943.  0 /* color table ref (not used with pcount 14) */
  944.  }};
  945. };
  946.  
  947.  
  948. resource rControlTemplate (Player2List) {
  949.  Player2List, /* Control ID */
  950.  {TopOfScore,WinWidth-Margin-ListWidth,BotOfScore,WinWidth-Margin}, /* list rectangle */
  951.  ListControl{{ /* list type */
  952.  0, /* flag */
  953.  fCtlProcNotPtr, /* more flags */
  954.  0, /* ref con */
  955.  0, /* Num Members in list */
  956.  0, /* list view (let list mgr calc) */
  957.  4, /* List type */
  958.  1, /* list start (start at top ) */
  959.  10, /* ListMemHeight */
  960.  6, /* ListMemSize */
  961.  0, /* ListRef (ID of list record) */
  962.  0 /* color table ref (not used with pcount 14) */
  963.  }};
  964. };
  965.  
  966.  
  967. resource rControlTemplate (QuitBut) {
  968.  QuitBut, /* control ID */
  969.  {TopRow4,Center+Col1,BotRow4,Center+Col5+ButWidth}, /* control rect */
  970.  simpleButtonControl{{ /* control type */
  971.  3, /* flag */
  972.  fCtlProcNotPtr+RefIsResource, /* more flags */
  973.  0, /* ref con */
  974.  QuitStr
  975.  }};
  976. };
  977.  
  978.  
  979. resource rControlTemplate (NewBut) {
  980.  NewBut, /* control ID */
  981.  {TopRow4,Col6,BotRow4,Col10+ButWidth}, /* control rect */
  982.  simpleButtonControl{{ /* control type */
  983.  3, /* flag */
  984.  fCtlProcNotPtr+RefIsResource, /* more flags */
  985.  0, /* ref con */
  986.  NewStr
  987.  }};
  988. };
  989.  
  990.  
  991.  
  992.  
  993. resource rPString (Str1) {
  994.  "1"
  995.  };
  996.  
  997. resource rPString (Str2) {
  998.  "2"
  999.  };
  1000.  
  1001. resource rPString (Str3) {
  1002.  "3"
  1003.  };
  1004.  
  1005. resource rPString (Str4) {
  1006.  "4"
  1007.  };
  1008.  
  1009. resource rPString (Str5) {
  1010.  "5"
  1011.  };
  1012.  
  1013. resource rPString (Str6) {
  1014.  "6"
  1015.  };
  1016.  
  1017. resource rPString (Str7) {
  1018.  "7"
  1019.  };
  1020.  
  1021. resource rPString (Str8) {
  1022.  "8"
  1023.  };
  1024.  
  1025. resource rPString (Str9) {
  1026.  "9"
  1027.  };
  1028.  
  1029. resource rPString (Str10) {
  1030.  "10"
  1031.  };
  1032.  
  1033. resource rPString (Str11) {
  1034.  "11"
  1035.  };
  1036.  
  1037. resource rPString (Str12) {
  1038.  "12"
  1039.  };
  1040.  
  1041. resource rPString (Str13) {
  1042.  "13"
  1043.  };
  1044.  
  1045. resource rPString (Str14) {
  1046.  "14"
  1047.  };
  1048.  
  1049. resource rPString (Str15) {
  1050.  "15"
  1051.  };
  1052.  
  1053. resource rPString (Str16) {
  1054.  "16"
  1055.  };
  1056.  
  1057. resource rPString (Str17) {
  1058.  "17"
  1059.  };
  1060.  
  1061. resource rPString (Str18) {
  1062.  "18"
  1063.  };
  1064.  
  1065. resource rPString (Str19) {
  1066.  "19"
  1067.  };
  1068.  
  1069. resource rPString (Str20) {
  1070.  "20"
  1071.  };
  1072.  
  1073. resource rPString (Str25) {
  1074.  "25"
  1075.  };
  1076.  
  1077. resource rPString (StrBull) {
  1078.  "Bullseye"
  1079.  };
  1080.  
  1081. resource rPString (QuitStr) {
  1082.  "Quit"
  1083.  };
  1084.  
  1085. resource rPString (NewStr) {
  1086.  "New Game"
  1087.  };
  1088.  
  1089.  
  1090.  
  1091.  
  1092. resource rControlTemplate (P1Score) {
  1093.  P1Score, /* control ID */
  1094.  {TopOfScore,Margin,BotOfScore,Margin+ScoreWidth},
  1095.  StatTextControl{{ /* control type */
  1096.  0xFF03, /* flag */
  1097.  fCtlProcNotPtr+RefIsResource, /* more flags */
  1098.  0, /* ref con */
  1099.  P1ScoreText /* title ref */
  1100.  }};
  1101. };
  1102.  
  1103. /* The static text for list window */
  1104. resource rTextForLETextBox2 (P1ScoreText) {
  1105.  TBFont
  1106.  TBShaston
  1107.  "\$00\$20" /* plain, size 32 */
  1108.  "*0"
  1109. };
  1110.  
  1111.  
  1112. resource rControlTemplate (P2Score) {
  1113.  P2Score, /* control ID */
  1114.  {TopOfScore,Center+Margin,BotOfScore,Center+Margin+ScoreWidth},
  1115.  StatTextControl{{ /* control type */
  1116.  0xFF03, /* flag */
  1117.  fCtlProcNotPtr+RefIsResource, /* more flags */
  1118.  0, /* ref con */
  1119.  P2ScoreText /* title ref */
  1120.  }};
  1121. };
  1122.  
  1123. /* The static text for list window */
  1124. resource rTextForLETextBox2 (P2ScoreText) {
  1125.  TBFont
  1126.  TBShaston
  1127.  "\$00\$20" /* plain, size 32 */
  1128.  "*1"
  1129. };
  1130.  
  1131.  
  1132.  
  1133.  
  1134. /*---------------------------------------------------------------------------*/
  1135. /*
  1136. /* Crickett Window
  1137. /*
  1138. /* This is the template for the window that is used for a crickett game.
  1139. /*
  1140. /*---------------------------------------------------------------------------*/
  1141. resource rWindParam1 (CrickettWindow) {
  1142.  fTitle+fVis, /* Frame Bits */
  1143.  CrickettWindow, /* title ID */
  1144.  0, /* ref Con */
  1145.  {0,0,0,0}, /* Zoom Rect */
  1146.  0, /* color table id */
  1147.  {0,0}, /* origin */
  1148.  {0,0}, /* data size */
  1149.  {0,0}, /* max height-width */
  1150.  {0,0}, /* scroll amount, hor,ver */
  1151.  {0,0}, /* page amount */
  1152.  0, /* wInfo Ref Con */
  1153.  0, /* wInfo height */
  1154.  {WinTop,WinLeft,WinTop+WinHeight,WinLeft+WinWidth}, /* window Position */
  1155.  infront, /* wPlane */
  1156.  CrickettWindow, /* Control Ref */
  1157.  refIsResource*0x0100+ResourceToResource /* Verb */
  1158. };
  1159.  
  1160. /*---------------------------------------------------------------------------*/
  1161. /* This is the title of the Crickett Window
  1162. /*---------------------------------------------------------------------------*/
  1163. resource rPString (CrickettWindow) {
  1164.  "Crickett"
  1165.  };
  1166.  
  1167.  
  1168.  
  1169. /* List of all controls in Crickett Window */
  1170.  
  1171. resource rControlList (CrickettWindow) {
  1172.  {
  1173.  P2Name,
  1174.  P1Name,
  1175.  
  1176.  K1But15,
  1177.  K1But16,
  1178.  K1But17,
  1179.  K1But18,
  1180.  K1But19,
  1181.  K1But20,
  1182.  K1ButBull,
  1183.  
  1184.  K2But15,
  1185.  K2But16,
  1186.  K2But17,
  1187.  K2But18,
  1188.  K2But19,
  1189.  K2But20,
  1190.  K2ButBull,
  1191.  
  1192.  KPlayer1List,
  1193.  KPlayer2List,
  1194.  
  1195.  K1Score,
  1196.  K2Score,
  1197.  
  1198.  KValue,
  1199.  
  1200.  NewBut,
  1201.  QuitBut
  1202.  };
  1203. };
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213. resource rControlTemplate (K1But15) {
  1214.  15+Player1ID, /* control ID */
  1215.  {TopRow15,Center-KButGap-KButWidth,TopRow15+VDelta-VGap,Center-KButGap}, /* control rect */
  1216.  simpleButtonControl{{ /* control type */
  1217.  3, /* flag */
  1218.  fCtlProcNotPtr, /* more flags */
  1219.  0, /* ref con */
  1220.  0
  1221.  }};
  1222. };
  1223.  
  1224. resource rControlTemplate (K1But16) {
  1225.  16+Player1ID, /* control ID */
  1226.  {TopRow16,Center-KButGap-KButWidth,TopRow16+VDelta-VGap,Center-KButGap}, /* control rect */
  1227.  simpleButtonControl{{ /* control type */
  1228.  3, /* flag */
  1229.  fCtlProcNotPtr, /* more flags */
  1230.  0, /* ref con */
  1231.  0
  1232.  }};
  1233. };
  1234.  
  1235. resource rControlTemplate (K1But17) {
  1236.  17+Player1ID, /* control ID */
  1237.  {TopRow17,Center-KButGap-KButWidth,TopRow17+VDelta-VGap,Center-KButGap}, /* control rect */
  1238.  simpleButtonControl{{ /* control type */
  1239.  3, /* flag */
  1240.  fCtlProcNotPtr, /* more flags */
  1241.  0, /* ref con */
  1242.  0
  1243.  }};
  1244. };
  1245.  
  1246. resource rControlTemplate (K1But18) {
  1247.  18+Player1ID, /* control ID */
  1248.  {TopRow18,Center-KButGap-KButWidth,TopRow18+VDelta-VGap,Center-KButGap}, /* control rect */
  1249.  simpleButtonControl{{ /* control type */
  1250.  3, /* flag */
  1251.  fCtlProcNotPtr, /* more flags */
  1252.  0, /* ref con */
  1253.  0
  1254.  }};
  1255. };
  1256.  
  1257. resource rControlTemplate (K1But19) {
  1258.  19+Player1ID, /* control ID */
  1259.  {TopRow19,Center-KButGap-KButWidth,TopRow19+VDelta-VGap,Center-KButGap}, /* control rect */
  1260.  simpleButtonControl{{ /* control type */
  1261.  3, /* flag */
  1262.  fCtlProcNotPtr, /* more flags */
  1263.  0, /* ref con */
  1264.  0
  1265.  }};
  1266. };
  1267.  
  1268. resource rControlTemplate (K1But20) {
  1269.  20+Player1ID, /* control ID */
  1270.  {TopRow20,Center-KButGap-KButWidth,TopRow20+VDelta-VGap,Center-KButGap}, /* control rect */
  1271.  simpleButtonControl{{ /* control type */
  1272.  3, /* flag */
  1273.  fCtlProcNotPtr, /* more flags */
  1274.  0, /* ref con */
  1275.  0
  1276.  }};
  1277. };
  1278.  
  1279.  
  1280. resource rControlTemplate (K1ButBull) {
  1281.  25+Player1ID, /* control ID */
  1282.  {TopRowBull,Center-KButGap-KButWidth,TopRowBull+VDelta-VGap,Center-KButGap}, /* control rect */
  1283.  simpleButtonControl{{ /* control type */
  1284.  3, /* flag */
  1285.  fCtlProcNotPtr, /* more flags */
  1286.  0, /* ref con */
  1287.  0
  1288.  }};
  1289. };
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296. resource rControlTemplate (K2But15) {
  1297.  15+Player2ID, /* control ID */
  1298.  {TopRow15,Center+KButGap,TopRow15+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1299.  simpleButtonControl{{ /* control type */
  1300.  3, /* flag */
  1301.  fCtlProcNotPtr, /* more flags */
  1302.  0, /* ref con */
  1303.  0
  1304.  }};
  1305. };
  1306.  
  1307. resource rControlTemplate (K2But16) {
  1308.  16+Player2ID, /* control ID */
  1309.  {TopRow16,Center+KButGap,TopRow16+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1310.  simpleButtonControl{{ /* control type */
  1311.  3, /* flag */
  1312.  fCtlProcNotPtr, /* more flags */
  1313.  0, /* ref con */
  1314.  0
  1315.  }};
  1316. };
  1317.  
  1318. resource rControlTemplate (K2But17) {
  1319.  17+Player2ID, /* control ID */
  1320.  {TopRow17,Center+KButGap,TopRow17+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1321.  simpleButtonControl{{ /* control type */
  1322.  3, /* flag */
  1323.  fCtlProcNotPtr, /* more flags */
  1324.  0, /* ref con */
  1325.  0
  1326.  }};
  1327. };
  1328.  
  1329. resource rControlTemplate (K2But18) {
  1330.  18+Player2ID, /* control ID */
  1331.  {TopRow18,Center+KButGap,TopRow18+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1332.  simpleButtonControl{{ /* control type */
  1333.  3, /* flag */
  1334.  fCtlProcNotPtr, /* more flags */
  1335.  0, /* ref con */
  1336.  0
  1337.  }};
  1338. };
  1339.  
  1340. resource rControlTemplate (K2But19) {
  1341.  19+Player2ID, /* control ID */
  1342.  {TopRow19,Center+KButGap,TopRow19+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1343.  simpleButtonControl{{ /* control type */
  1344.  3, /* flag */
  1345.  fCtlProcNotPtr, /* more flags */
  1346.  0, /* ref con */
  1347.  0
  1348.  }};
  1349. };
  1350.  
  1351. resource rControlTemplate (K2But20) {
  1352.  20+Player2ID, /* control ID */
  1353.  {TopRow20,Center+KButGap,TopRow20+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1354.  simpleButtonControl{{ /* control type */
  1355.  3, /* flag */
  1356.  fCtlProcNotPtr, /* more flags */
  1357.  0, /* ref con */
  1358.  0
  1359.  }};
  1360. };
  1361.  
  1362. resource rControlTemplate (K2ButBull) {
  1363.  25+Player2ID, /* control ID */
  1364.  {TopRowBull,Center+KButGap,TopRowBull+VDelta-VGap,Center+KButGap+KButWidth}, /* control rect */
  1365.  simpleButtonControl{{ /* control type */
  1366.  3, /* flag */
  1367.  fCtlProcNotPtr, /* more flags */
  1368.  0, /* ref con */
  1369.  0
  1370.  }};
  1371. };
  1372.  
  1373.  
  1374. resource rControlTemplate (KPlayer1List) {
  1375.  Player1List, /* Control ID */
  1376.  {TopRow17,Margin,TopRow17+BotOfScore-TopOfScore,Margin+ListWidth}, /* list rectangle */
  1377.  ListControl{{ /* list type */
  1378.  0, /* flag */
  1379.  fCtlProcNotPtr, /* more flags */
  1380.  0, /* ref con */
  1381.  0, /* Num Members in list */
  1382.  0, /* list view (let list mgr calc) */
  1383.  4, /* List type */
  1384.  1, /* list start (start at top ) */
  1385.  10, /* ListMemHeight */
  1386.  6, /* ListMemSize */
  1387.  0, /* ListRef (ID of list record) */
  1388.  0 /* color table ref (not used with pcount 14) */
  1389.  }};
  1390. };
  1391.  
  1392.  
  1393. resource rControlTemplate (KPlayer2List) {
  1394.  Player2List, /* Control ID */
  1395.  {TopRow17,WinWidth-Margin-ListWidth,TopRow17+BotOfScore-TopOfScore,WinWidth-Margin}, /* list rectangle */
  1396.  ListControl{{ /* list type */
  1397.  0, /* flag */
  1398.  fCtlProcNotPtr, /* more flags */
  1399.  0, /* ref con */
  1400.  0, /* Num Members in list */
  1401.  0, /* list view (let list mgr calc) */
  1402.  4, /* List type */
  1403.  1, /* list start (start at top ) */
  1404.  10, /* ListMemHeight */
  1405.  6, /* ListMemSize */
  1406.  0, /* ListRef (ID of list record) */
  1407.  0 /* color table ref (not used with pcount 14) */
  1408.  }};
  1409. };
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416. resource rControlTemplate (K1Score) {
  1417.  P1Score, /* control ID */
  1418.  {TopOfScore,Margin,BotOfScore,Margin+ListWidth},
  1419.  StatTextControl{{ /* control type */
  1420.  0xFF03, /* flag */
  1421.  fCtlProcNotPtr+RefIsResource, /* more flags */
  1422.  0, /* ref con */
  1423.  k1ScoreText /* title ref */
  1424.  }};
  1425. };
  1426.  
  1427. /* The static text for list window */
  1428. resource rTextForLETextBox2 (k1ScoreText) {
  1429.  TBFont
  1430.  TBShaston
  1431.  "\$00\$20" /* plain, size 32 */
  1432.  "*0"
  1433. };
  1434.  
  1435.  
  1436. resource rControlTemplate (K2Score) {
  1437.  P2Score, /* control ID */
  1438.  {TopOfScore,WinWidth-Margin-ListWidth,BotOfScore,WinWidth-Margin},
  1439.  StatTextControl{{ /* control type */
  1440.  0xFF03, /* flag */
  1441.  fCtlProcNotPtr+RefIsResource, /* more flags */
  1442.  0, /* ref con */
  1443.  k2ScoreText /* title ref */
  1444.  }};
  1445. };
  1446.  
  1447. /* The static text for list window */
  1448. resource rTextForLETextBox2 (K2ScoreText) {
  1449.  TBRightJust
  1450.  TBFont
  1451.  TBShaston
  1452.  "\$00\$20" /* plain, size 32 */
  1453.  "*1"
  1454. };
  1455.  
  1456.  
  1457.  
  1458.  
  1459. resource rControlTemplate (KValue) {
  1460.  0, /* control ID */
  1461.  {TopRow20-6,Center-35,TopRowBull+VDelta,Center+35},
  1462.  StatTextControl{{ /* control type */
  1463.  CtlInactive, /* flag */
  1464.  fCtlProcNotPtr+RefIsResource, /* more flags */
  1465.  0, /* ref con */
  1466.  KValue /* title ref */
  1467.  }};
  1468. };
  1469.  
  1470. #Define Return "\$0D"
  1471.  
  1472. /* The static text for list window */
  1473. resource rTextForLETextBox2 (KValue) {
  1474.  TBCenterJust
  1475.  TBSpExtra
  1476.  "\$07\$00"
  1477.  "20"
  1478.  Return
  1479.  "19"
  1480.  Return
  1481.  "18"
  1482.  Return
  1483.  "17"
  1484.  Return
  1485.  "16"
  1486.  Return
  1487.  "15"
  1488.  Return
  1489.  "Bull"
  1490.  Return
  1491. };
  1492.  
  1493.  
  1494.  
  1495. /*********************************************************************/
  1496. /*
  1497. /* Menus
  1498. /*
  1499. /*********************************************************************/
  1500.  
  1501. #define AppleMenuID $1100
  1502. #define FileMenuID $1200
  1503. #define EditMenuID $1300
  1504. #define GameMenuID $1400
  1505.  
  1506. #Define AboutID $1101
  1507.  
  1508. #define CloseID 255
  1509. #define NewGameID $1202
  1510. #define QuitID $1203
  1511.  
  1512. #define UndoID 250
  1513. #define CutID 251
  1514. #define CopyID 252
  1515. #define PasteID 253
  1516. #define ClearID 254
  1517.  
  1518. #define RobinGameID $1401
  1519. #define CrickettGameID $1402
  1520.  
  1521.  
  1522. resource rMenuBar (1) {
  1523.  {
  1524.  AppleMenuID,
  1525.  FileMenuID,
  1526.  EditMenuID,
  1527.  GameMenuID
  1528.  };
  1529. };
  1530.  
  1531. resource rMenu (AppleMenuID) {
  1532.  AppleMenuID,
  1533.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  1534.  AppleMenuID,
  1535.  { AboutID };
  1536. };
  1537.  
  1538. resource rMenu (FileMenuID) {
  1539.  FileMenuID,
  1540.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  1541.  FileMenuID,
  1542.  { NewGameID,
  1543.  QuitID };
  1544. };
  1545.  
  1546. resource rMenu (EditMenuID) {
  1547.  EditMenuID,
  1548.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  1549.  EditMenuID,
  1550.  {
  1551.  UndoID,
  1552.  CutID,
  1553.  CopyID,
  1554.  PasteID,
  1555.  ClearID
  1556.  };
  1557.  };
  1558.  
  1559. resource rMenu (GameMenuID) {
  1560.  GameMenuID,
  1561.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  1562.  GameMenuID,
  1563.  { RobinGameID,CrickettGameID };
  1564. };
  1565.  
  1566. resource rMenuItem (AboutID) {
  1567.  AboutID,
  1568.  "","",
  1569.  0,
  1570.  RefIsResource*ItemTitleRefShift+fDivider,
  1571.  AboutID
  1572. };
  1573.  
  1574. resource rMenuItem (UndoID) {
  1575.  UndoID,
  1576.  "","",
  1577.  0,
  1578.  RefIsResource*ItemTitleRefShift,
  1579.  UndoID
  1580. };
  1581.  
  1582. resource rMenuItem (CutID) {
  1583.  CutID,
  1584.  "X","x",
  1585.  0,
  1586.  RefIsResource*ItemTitleRefShift,
  1587.  CutID
  1588. };
  1589.  
  1590. resource rMenuItem (CopyID) {
  1591.  CopyID,
  1592.  "C","c",
  1593.  0,
  1594.  RefIsResource*ItemTitleRefShift,
  1595.  CopyID
  1596. };
  1597.  
  1598. resource rMenuItem (PasteID) {
  1599.  PasteID,
  1600.  "V","v",
  1601.  0,
  1602.  RefIsResource*ItemTitleRefShift,
  1603.  PasteID
  1604. };
  1605.  
  1606. resource rMenuItem (ClearID) {
  1607.  ClearID,
  1608.  "","",
  1609.  0,
  1610.  RefIsResource*ItemTitleRefShift,
  1611.  ClearID
  1612. };
  1613.  
  1614. resource rMenuItem (CloseID) {
  1615.  CloseID,
  1616.  "W","w",
  1617.  0,
  1618.  RefIsResource*ItemTitleRefShift,
  1619.  CloseID
  1620. };
  1621.  
  1622. resource rMenuItem (QuitID) {
  1623.  QuitID,
  1624.  "Q","q",
  1625.  0,
  1626.  RefIsResource*ItemTitleRefShift,
  1627.  QuitID
  1628. };
  1629.  
  1630. resource rMenuItem (NewGameID) {
  1631.  NewGameID,
  1632.  "N","n",
  1633.  0,
  1634.  RefIsResource*ItemTitleRefShift,
  1635.  NewGameID
  1636. };
  1637.  
  1638. resource rMenuItem (RobinGameID) {
  1639.  RobinGameID,
  1640.  "","",
  1641.  0,
  1642.  RefIsResource*ItemTitleRefShift,
  1643.  RobinGameID
  1644. };
  1645.  
  1646. resource rMenuItem (CrickettGameID) {
  1647.  CrickettGameID,
  1648.  "","",
  1649.  0,
  1650.  RefIsResource*ItemTitleRefShift,
  1651.  CrickettGameID
  1652. };
  1653.  
  1654. resource rPString (AppleMenuID,noCrossBank) {
  1655.  "@"
  1656.  };
  1657. resource rPString (FileMenuID,noCrossBank) {
  1658.  " File "
  1659.  };
  1660. resource rPString (EditMenuID,noCrossBank) {
  1661.  " Edit "
  1662.  };
  1663. resource rPString (GameMenuID,noCrossBank) {
  1664.  " Game "
  1665.  };
  1666. resource rPString (AboutID,noCrossBank) {
  1667.  "About Darts..."
  1668.  };
  1669. resource rPString (UndoID,noCrossBank) {
  1670.  "Undo"
  1671.  };
  1672. resource rPString (CutID,noCrossBank) {
  1673.  "Cut"
  1674.  };
  1675. resource rPString (CopyID,noCrossBank) {
  1676.  "Copy"
  1677.  };
  1678. resource rPString (PasteID,noCrossBank) {
  1679.  "Paste"
  1680.  };
  1681. resource rPString (ClearID,noCrossBank) {
  1682.  "Clear"
  1683.  };
  1684. resource rPString (NewGameID,noCrossBank) {
  1685.  "New"
  1686.  };
  1687. resource rPString (QuitID,noCrossBank) {
  1688.  "Quit"
  1689.  };
  1690. resource rPString (RobinGameID,noCrossBank) {
  1691.  "Robin"
  1692.  };
  1693. resource rPString (CrickettGameID,noCrossBank) {
  1694.  "Crickett"
  1695.  };
  1696.